package com.youlai.boot.system.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import jakarta.validation.constraints.*;

/**
 * 商品表单对象
 *
 * @author youlaitech
 * @since 2024-10-22 16:26
 */
@Getter
@Setter
@Schema(description = "商品表单对象")
public class productForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Integer id;

    @Schema(description = "商品名称")
    @NotBlank(message = "商品名称不能为空")
    @Size(max=50, message="商品名称长度不能超过50个字符")
    private String name;

    @Schema(description = "价格")
    @NotNull(message = "价格不能为空")
    private Float price;

    @Schema(description = "赞")
    @NotNull(message = "赞不能为空")
    private Integer zan;

    @Schema(description = "销量")
    @NotNull(message = "销量不能为空")
    private Integer number;

    @Schema(description = "状态，1：上线，0：下线")
    @NotNull(message = "状态，1：上线，0：下线不能为空")
    private Integer status;

    @Schema(description = "商品图片url")
    @NotBlank(message = "商品图片url不能为空")
    @Size(max=100, message="商品图片url长度不能超过100个字符")
    private String imageurl;

    @Schema(description = "商品描述")
    @NotBlank(message = "商品描述不能为空")
    @Size(max=200, message="商品描述长度不能超过200个字符")
    private String miaoshu;


}
